package com.cpj.bsyyzx.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cpj.bsyyzx.entity.NurseClass;
import com.cpj.bsyyzx.mapper.NurseClassMapper;
import com.cpj.bsyyzx.service.INurseClassService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.sql.Wrapper;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 五个臭皮匠
 * @since 2021-04-27
 */
@Service
public class NurseClassServiceImpl extends ServiceImpl<NurseClassMapper, NurseClass> implements INurseClassService {


    @Override
    public Page pageList(Page page, NurseClass nurseClass) {
        if (page == null) {
            page = new Page();
        }

        QueryWrapper<NurseClass> wrapper = new QueryWrapper();
        if (nurseClass != null && !StringUtils.isEmpty((nurseClass.getNClass()))) {
            wrapper.like("n_class", nurseClass.getNClass());
        }
        return super.page(page, wrapper);
    }


}






